extends layout

block headJs
    != js("views/countdownView")
block contents
    #countdownPage
        h2#cdTitle=cd.attributes.title
        #cdTimer(data-value=targetDate.format("YYYY-MM-DD HH:mm:ss Z"))
            if duration.asYears() > 1
                .dash.years
                    label years
                    .digit
                    .digit
            if duration.asMonths() > 1
                .dash.months
                    label months
                    .digit
                    .digit
            if duration.days() > 0
                .dash.days
                    label days
                    .digit
                    .digit
            .dash.hours
                label hours
                .digit
                .digit
            .dash.minutes
                label minutes
                .digit
                .digit
            .dash.seconds
                label seconds
                .digit
                .digit

        h3#cdOnEndMessage !{onEndMessage}

       if playSound
           audio#sound
               source(src="/sounds/bell.mp3", type="audio/mpeg")
               source(src="/sounds/bell.ogg", type="audio/ogg")